﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DaInterFace
{
    public class MeterInfoObject
    {
        /// <summary>
        /// 数据是否可用
        /// </summary>
        public Boolean InfoEnable = false;
        /// <summary>
        /// 不可用原因
        /// </summary>
        public String UnEnableReason;
        /// <summary>
        /// 账套
        /// </summary>
        public ItemObject Base;
        /// <summary>
        /// 磁卡
        /// </summary>
        public ItemObject Card;
        /// <summary>
        /// 是否长期卡
        /// </summary>
        public Boolean IsLong;
        /// <summary>
        /// 是否正在计量
        /// </summary>
        public Boolean IsMetering;
        /// <summary>
        /// 单据类型（0：销售；1：采购；2：其他；3：调拨）
        /// </summary>
        public int Type;
        /// <summary>
        /// 预置车牌号码
        /// </summary>
        public String PreCarNumber;
        /// <summary>
        /// 车牌号码
        /// </summary>
        public String CarNumber;
        /// <summary>
        /// 长期卡ID
        /// </summary>
        public String OrderID;
        /// <summary>
        /// 单据ID
        /// </summary>
        public String BillID = "";
        /// <summary>
        /// 源ID
        /// </summary>
        public String PreSrcID;
        /// <summary>
        /// 单据编号
        /// </summary>
        public String BillNumber;
        /// <summary>
        /// 当前步骤（1：开票；2：进厂计量；3：出厂计量）
        /// </summary>
        public int Step;
        /// <summary>
        /// 计量类型（0：正常计量；1：退货；2：拒绝收料/空车出厂）
        /// </summary>
        public int MeterType;
        /// <summary>
        /// 预置预装/原发
        /// </summary>
        public Decimal PreQtyIpt;
        /// <summary>
        /// 预装/原发
        /// </summary>
        public Decimal QtyIpt;
        /// <summary>
        /// 进厂计量重量
        /// </summary>
        public Decimal QtyIns;
        /// <summary>
        /// 出厂计量重量
        /// </summary>
        public Decimal QtyOut;
        /// <summary>
        /// 实际重量
        /// </summary>
        public Decimal QtySut;
        /// <summary>
        /// 记账重量
        /// </summary>
        public Decimal QtyAcc;
        /// <summary>
        /// 历史皮重
        /// </summary>
        public Decimal QtyHis;
        /// <summary>
        /// 开票人
        /// </summary>
        public String EmpPln;
        /// <summary>
        /// 进厂司磅员
        /// </summary>
        public String EmpIns;
        /// <summary>
        /// 出厂司磅员
        /// </summary>
        public String EmpOut;
        /// <summary>
        /// 签收签发
        /// </summary>
        public String EmpChk;
        /// <summary>
        /// 开票时间
        /// </summary>
        public DateTime TimePln;
        /// <summary>
        /// 进厂时间
        /// </summary>
        public DateTime TimeIns;
        /// <summary>
        /// 出厂时间
        /// </summary>
        public DateTime TimeOut;
        /// <summary>
        /// 产品/原料
        /// </summary>
        public ItemObject Item;
        /// <summary>
        /// 物料
        /// </summary>
        public ItemObject SourceItem;
        /// <summary>
        /// 剩余数量
        /// </summary>
        public Decimal ItemBal;
        /// <summary>
        /// 产品单价（挂牌）
        /// </summary>
        public Decimal ItemPrice;
        /// <summary>
        /// 往来单位
        /// </summary>
        public ItemObject CurrentUnit;
        /// <summary>
        /// 收料员/发料员
        /// </summary>
        public String Checker;
        /// <summary>
        /// 生产线
        /// </summary>
        public String Line;

    }

    public class ItemObject
    {
        public String ID;
        public String Number;
        public String Name;

        public ItemObject(String id, String number, String name)
        {
            ID = id;
            Number = number;
            Name = name;
        }
    }
}
